<div id="screansBlock">
    <div id="block">
        <div id="leftBlock">
            <?foreach ($allImages[$mainBlock['id']] as $key=>$value):?>
                <img src="<?=$value['imgPath'];?>" 
                     title="<?=$value['name'];?>" />
            <?endforeach;?>
        </div>
        <div id="centrBlock">
            <?for ($i=0; $i<=2; $i++):?>
                <?if (isset($allImages[$centrBlock['id']][$i]['imgPath'])):?>
                    <div class="centrBlocks">
                        <a href="/signs/sign/<?=$allImages[$centrBlock['id']][$i]['select1'];?>" title="<?=(isset($allImages[$centrBlock['id']][$i]['name'])) ? $allImages[$centrBlock['id']][$i]['name'] : '';?>">
                            <img src="<?=(isset($allImages[$centrBlock['id']][$i]['imgPath'])) ? $allImages[$centrBlock['id']][$i]['imgPath'] : '';?>"
                                  title="<?=(isset($allImages[$centrBlock['id']][$i]['name'])) ? $allImages[$centrBlock['id']][$i]['name'] : '';?>" />
                            <div class="bottomBlock">
                                <span class="blueMessege"><?=(isset($allImages[$centrBlock['id']][$i]['name'])) ? $allImages[$centrBlock['id']][$i]['name'] : '';?></span>
                                <div class="rightArrow"></div>
                            </div>
                        </a>
                    </div>
                <?endif;?>
            <?endfor;?>
        </div>
    </div>
    <div id="rightBlock">
        <?foreach($rightBlockItems as $v):?>
            <div class="rightBlocks">
                <?if($rightBlock[$v['id']]['checkbox2']!=1):?>
                    <a href="/signs/sign/<?=$rightBlock[$v['id']]['select1'];?>">
                        <img src="<?=(isset($rightBlock[$v['id']]['box3'])) ? $rightBlock[$v['id']]['box3'] : '';?>" style="height: 100%"/>
                    </a>
                <?else:?>
                    <a href="/signs/sign/<?=$rightBlock[$v['id']]['select1'];?>" style="display:block; width: 100%; height: 100%;">
                        <object width="197" height="213">
                            <param name="movie" value="<?=(isset($rightBlock[$v['id']]['attacment']))?$rightBlock[$v['id']]['attacment']:''?>">
                            <embed src="<?=(isset($rightBlock[$v['id']]['attacment']))?$rightBlock[$v['id']]['attacment']:''?>" width="197" height="213">
                            </embed>
                        </object>
                    </a>
                <?endif;?>
            </div>
        <?endforeach;?>
    </div>
</div>
<?=$bottomblock;?>
<?=$downblock;?>